package data.missions;

import data.tileables.Base;
import data.tileables.Controllable;
import data.tileables.Resources;

public class UnassignAllFromBase extends Mission{
	private Base base;
	public UnassignAllFromBase(Base b)
	{
		base = b;
		thisControllable = b;
		displayName = "Unassign All";
	}
	public int execute()
	{
		int workersFreed = 0;
		workersFreed += base.getMetalList().unassignAllWorkers();
		workersFreed += base.getEnergyList().unassignAllWorkers();
		workersFreed += base.getFoodList().unassignAllWorkers();
		base.incUnassignedWorkers(workersFreed);
		System.out.println("workers freed = " + workersFreed);
		
		return 1;
	}
}
